<!--
/**************************************************
* @(#)uploadview.jsp
*
* Copyright (c) 2005 Hitrust Technology Inc.
* Developed by SDC, Hitrust.
* All Rights Reserved.
*
* Modify History:
*  v1.00, 2006/2/21, vincent
*  1) first release
/**************************************************
-->
<%@ page contentType="text/html; charset=UTF-8"%>

<%@ include file="../common.jsp"%>
<SCRIPT language="JavaScript" src="<%=root%>/js/hi-check.js"></SCRIPT>
<%@ taglib uri="../WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="../WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="../WEB-INF/struts-logic.tld" prefix="logic"%>
<html>
<head>
<title>数据导入和导出</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK rel="stylesheet" href="css/caigouxitong.css">
<SCRIPT language="JavaScript" src="<%=root%>/js/common.js"></SCRIPT>
</head>

<script language="JavaScript">
function process(){
  if(form2.filename.value.length<1){
  	alert('请选择备份文件');
  	return false;
  }
  return true;
 }
 
 function backup(){
    form1.action = "<%= response.encodeURL(request.getContextPath() + "/A500202.do") %>";
    form1.submit();
   }
 
 function down(){
  alert(form1.datetime.value);
  var datetime=form1.datetime.value;
  var url = "<%=response.encodeURL(root+"/A500204.do")%>?datetime="+datetime;
  window.open(url,null," edge: sunken ,center: Yes, help: No, resizable: Yes, status: No,width=280px,height=220px, scrollbars=yes");
		  
 }
</script>

<BODY   BGCOLOR=#f5f5f5 LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<p><br></p>
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td height="20"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="1">
        <tr height="20">
          <td height="20" width="1" class="mtxt_black">&nbsp;</td>
          <td height="30" width="758" class="mtxt_black">数据备份和恢复</td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td class="bg_line" height="2"></td>
  </tr>
</table>

<br>


<center>
<!--
****************************显示页面*********************************************
-->
<form name=form1 action="" method=post> 
 <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr> 
            <td> 
                <table class=bg_table id=tableId	cellspacing=1 cellpadding=2 width=90% align=center border=0>
                    <tbody> 
                    <tr class="bg_column" height=20> 
                        <td class=top align=middle colspan="2"> 
                           <p align="left">数据备份</td>
                    </tr>
                    <tr class="bg_row_odd" height=20>
                         <td class=top align=middle width="15%"> 

                        备份数据</td>
                        <td class=top align=middle width="83%"> 
                            <div align="center" class="txt_content">

                            <p align="left">
				<input type="button" value="备份" class="kuang" onclick="return backup();"> 
				<FONT color="#ff0033">(点击按钮开始备份<FONT color="#ff0033">)
                           </div>
                        </td>
                    </tr>
                    <tr class="bg_row_odd" height=20>
                         <td class=top align=middle width="15%"> 

                        下载备份数据</td>
                        <td class=top align=middle width="83%"> 
                            <div align="center" class="txt_content">

                            <p align="left">
				<input type="button" value="下载" class="kuang" onclick="return down();"> 
				            <select name="datetime">
				            <option value="1">最近一天</option>
				            <option value="2">最近二天</option>
				            <option value="3">最近三天</option>
				            </select>
				            <FONT color="#ff0033">(提供最近三天备份数据的下载)
                           </div>
                        </td>
                    </tr>            
                    </tbody> 
                </table>
              
            </td>
            
        </tr>
    </table>
 </form>
 <form name=form2 action="<%= response.encodeURL(request.getContextPath() + "/A500203.do") %>" method=post onsubmit="if(!process()) return false;"> 
  <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr> 
            <td> 
                <table class=bg_table id=tableId cellspacing=1 cellpadding=2 width=90% align=center border=0>
                    <tbody> 
                    <tr class="bg_column" height=20> 
                        <td class=top align=middle colspan="2"> 
                           <p align="left">数据恢复</td>
                    </tr>
                    <tr class="bg_row_odd" height=20>
                         <td class=top align=middle width="15%"> 
                        备份文件：</td>
                        <td class=top align=middle width="82%"> 
                            <p align="left">&nbsp;
                            <input type=file name="filename" size="40">
                            </td>
                    </tr>
                    <tr class="bg_row_odd" height=20>
                         <td class=top align=middle width="15%"> 
                        需要恢复表：</td>
                        <td class=top align=middle width="82%"> 
                            <p align="left">&nbsp;
                            <textarea name="tables" rows="5" cols="40"></textarea>
                            <FONT color="#ff0033">(如指定表,表名之间用","各开,恢复全部不用填。<FONT color="#ff0033">)
                            </td>
                    </tr>
                                
                    <tr class="bg_row_odd" height=20>
                         <td class=top align=middle width="98%" colspan="2"> 
                         <input type="submit" value="确认" class="kuang"> 
                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                          </td>
                    </tr>
                    </tbody> 
                </table>
              
            </td>
        </tr>
    </table>
 </form>

   <!--
****************************显示列表*********************************************
   -->
   
</BODY>
</html>